package com.yzt.sys.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.yzt.base.entity.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * <p>
 * 权限表
 * </p>
 *
 * @author Y
 * @since 2021-01-21
 */
@TableName("sys_permission")
@ApiModel(value = "Permission对象", description = "权限表")
public class Permission extends BaseEntity {

	private static final long serialVersionUID = 1L;

	@ApiModelProperty(value = "权限名称")
	@TableField("name")
	private String name;

	@ApiModelProperty(value = "权限KEY")
	@TableField("keyword")
	private String keyword;

	@ApiModelProperty(value = "权限描述")
	@TableField("description")
	private String description;

	@ApiModelProperty(value = "权限父级ID")
	@TableField("parent_id")
	private Long parentId;

	@ApiModelProperty(value = "权限父级名称")
	@TableField(exist = false)
	private String parentName;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getKeyword() {
		return keyword;
	}

	public void setKeyword(String keyword) {
		this.keyword = keyword;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public Long getParentId() {
		return parentId;
	}

	public void setParentId(Long parentId) {
		this.parentId = parentId;
	}
	
	public String getParentName() {
		return parentName;
	}

	public void setParentName(String parentName) {
		this.parentName = parentName;
	}

	@Override
	public String toString() {
		return "Permission [name=" + name + ", keyword=" + keyword + ", description=" + description + ", parentId="
				+ parentId + ", parentName=" + parentName + "]";
	}
}
